#include <ros/ros.h>
#include <iostream>
#include "map_operation/map_operation.h"

int main(int argc, char ** argv)
{
    ros::init(argc, argv, "map_operation");
    ros::NodeHandle nh;
    ros::NodeHandle private_nh("~");

    std::string map_file("");
    std::string vehicle_param_file("");
    std::string file_path("");

    private_nh.getParam("map_file", map_file);
    private_nh.getParam("param_file", vehicle_param_file);
    private_nh.getParam("path", file_path);

    std::shared_ptr<MapOperation> ptr_mapoperation(new MapOperation(nh, map_file, vehicle_param_file, file_path));
    ptr_mapoperation->Init();

    ros::Rate loop(20);
    while (ros::ok())
    {
        ptr_mapoperation->PublishViewer();

        ros::spinOnce();
        loop.sleep();
    }
    
    ros::shutdown();
    return 0;
}